home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / ZIPPED / DOS / GRAPHICS / POVSRC.ZIP / MACHINE.ZIP / MAC.SIT / config.h < prev    next >
Text File  |  1992-04-27  |  4KB  |  118 lines

  1. /****************************************************************************
  2. *                config.h Mac
  3. *
  4. *  This file contains macintosh-specific defines, types, etc for Think C and MPW.
  5. *
  6. *  from Persistence of Vision Raytracer 
  7. *       Copyright 1991 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *                       *IMPORTANT!*
  10. *  This copyrighted software is freely distributable. The source and/or
  11. * object code may be copied or uploaded to communications services so long as
  12. * this notice remains at the top of each file.
  13. *  If any changes are made to the program, you must clearly indicate in the
  14. * documentation and in the program startup message who it was who made the
  15. * changes. The documentation should also describe what those changes were.
  16. *  This software may not be included in whole or in part into any commercial
  17. * package without the express written consent of the PV-Team. It may,
  18. * however, be included in other freely distributed software so long as proper
  19. * credit for the software is given. No more than five dollars U.S. ($5) can
  20. * be charged for the copying of this software and the media it is provided on,
  21. * i.e. a shareware distribution company may only charge five U.S dollars or
  22. * less for providing this software.
  23. *  This software is provided as is without any guarantees or warranty.
  24. * Although the authors have attempted to find and correct any bugs in the
  25. * software, they are not responsible for any damage caused by the use of the
  26. * software. The authors are under no obligation to provide service,
  27. * corrections, or upgrades to this package.
  28. *-----------------------------------------------------------------------------
  29. *  Despite all the legal stuff above, if you have any problems with the
  30. * program the POV-Team would like to hear about them. Also, if you have any
  31. * comments, questions or enhancements, please contact the POV-Team on the
  32. * Compuserve Online Service in the COMART forum message section 16 (!GO
  33. * COMART). The CIS COMART forum is devoted to computer generated artwork like
  34. * raytracing, animation and fractals. For more information regarding the POV
  35. * team see the file POVLEGAL.TXT. For more information on Compuserve call
  36. * (in the U.S.) 1-800-848-8990.
  37. *       Drew Wells
  38. *       PV-Team Leader
  39. *       CIS: 73767,1244
  40. *  This program is based on the popular DKB raytracer version 2.12 written by
  41. * David Buck, a POV-Team member.
  42. *  (David Buck CIS: 70521,1371 Internet: dbuck@ccs.carleton.ca)
  43. *****************************************************************************/
  44.  
  45. #define EPSILON 1.0e-5
  46. // This is also the default.  Set here in case someone decides to lower the default later.
  47. #define MAX_CONSTANTS 1000
  48.  
  49. #include <stdarg.h>
  50. #include <stdlib.h>
  51.  
  52. #include <math.h>            /* fmod, floor */
  53. #ifdef applec
  54. #include <sysequ.h>
  55. #define TICKS    (*(long*)Ticks)
  56. #endif applec
  57. #ifdef THINK_C
  58. #define TICKS Ticks
  59. #endif THINK_C
  60.  
  61. #ifdef applec
  62. #define COMPILER_VER ".MACMPW"
  63. #endif applec
  64.  
  65. #ifdef THINK_C
  66. #define COMPILER_VER ".MACTH5"
  67. #endif THINK_C
  68.  
  69. #define ALTMAIN 1
  70.  
  71. #define DBL double
  72. #define SQRT sqrt
  73. #define DBL_FORMAT_STRING "%lf"
  74.  
  75.  
  76. #define TEST_ABORT if (Stop_Flag) return;
  77.  
  78. #define COOPERATE Cooperate();
  79. #define PARAMS(x) x
  80. #define volatile
  81.  
  82. #define FILENAME_SEPARATOR ":"
  83.  
  84. /* defines for special binary (raw, uncooked) modes of fopen() */
  85. #define READ_FILE_STRING "rb"
  86. #define WRITE_FILE_STRING "wb"
  87. #define APPEND_FILE_STRING "ab"
  88.  
  89. /* defines for machine-specific PaletteOption settings */
  90. #define NORMAL '0'
  91. #define GREY   'G'
  92. #define START_TIME tused = TICKS; in_parse = 0;
  93. #define STOP_TIME
  94. #define TIME_ELAPSED (TICKS - tused ) / 60;
  95.  
  96. extern int in_parse;
  97.  
  98. void restore_state(void);
  99. int    first_time_called(void);    // added definition to extinguish MPW warning [esp]
  100. #define STARTUP_POVRAY int Display_Started = FALSE; int Shadow_Test_Flag = FALSE; if (first_time_called())
  101.  
  102. #define    exit(x) { close_all(); restore_state();}
  103. #define malloc(x) POV_malloc(x)
  104. #define calloc(size, nitems) POV_calloc(size, nitems)
  105. #define free(x) POV_free(x)
  106. void *POV_malloc(size_t size);
  107. void POV_free(void *ptr);
  108. void *POV_calloc (size_t nmemb, size_t size);
  109.  
  110. #include "stdio_p2w.h"    // moved definitions in here to be more self-contained [esp]
  111.